﻿using System;
using Company.IO.Interfaces;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Company.System.IO.IntegrationTests
{
    public partial class DirectoryTest : TestBase<IDirectory>
    {
        private const string _SGetLastWriteTimeMethodName = "GetLastWriteTime";

        [TestMethod]
        public void GetLastWriteTime_PathValid_FileSystemEntries()
        {
            //Arrange
            string path = SLocalPath;
            DateTime expected = global::System.IO.Directory.GetLastWriteTime(path);

            //Act
            DateTime actual = Directory.GetLastWriteTime(path);

            //Assert
            Assert.AreEqual(expected, actual);
        }


        [TestMethod]
        public void GetLastWriteTime_PathNull_ArgumentNullException()
        {
            PathNull_ArgumentNullException(_SGetLastWriteTimeMethodName);
        }

        [TestMethod]
        public void GetLastWriteTime_PathEmpty_ArgumentException()
        {
            PathEmpty_ArgumentException(_SGetLastWriteTimeMethodName);
        }
    }
}